package com.iris.lock;

/**
 * 项目: thinking
 * 包名: com.iris.lock
 * 作者: victor
 * 日期: 2016年10月26日
 * 说明: Lock
 */
public class Main {
	private static final String t="hello2";
	public static void main(String[] args) {
//		Thread t1=new Thread(new Lock());
//		Thread t2=new Thread(new Lock());
//		t1.start();
//		t2.start();
		
		String a = "hello2"; 
		System.out.println(Main.t==a);
        String b = "hello";
        String end ="2";
        String d = "hello";
        String c = b + "2"; 
        String e = d + "2";
        System.out.println((b == d));
        System.out.println((a == c));
        System.out.println((a == e));
        String f = "hello"+"2";
        String g = "hello"+"2";
        System.out.println((f == g));
        System.out.println((b+end)=="hello2");
//		Main main=new Main();
//		String end="2";
//		main.test(end);
	}
	
	public void test(String end){
		String a = "hello2"; 
        String b = "hello";
        String d = "hello";
        String c = b + end; 
        String e = d + end;
        System.out.println((a == c));
        System.out.println((a == e));
        System.out.println((b == d));
	}

}
